//
//  ProcessOrderTableViewCell.swift
//  CJXSwiftStoryboard
//
//  Created by CJX on 2016/10/24.
//  Copyright © 2016年 caijianxi. All rights reserved.
//

import UIKit

class ProcessOrderTableViewCell: UITableViewCell {

    
    @IBOutlet weak var myImageView: UIImageView!
    
    @IBOutlet weak var nameLabel: UILabel!
    
    @IBOutlet weak var priceLabel: UILabel!
    
    @IBOutlet weak var sizeLabel: UILabel!
    
    
    var model : ShoppingCartModel?{
        didSet{
            
            myImageView.sd_setImage(with: URL(string: (model?.products_image!)!))
            
            nameLabel.text = model?.products_name!
            
            priceLabel.text = (model?.format_price!)! + "  *  " + (model?.quantity!)! + "  =  " + model!.format_total_price!
            
            sizeLabel.text = model!.products_options_values_name!
            
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        
        myImageView.contentMode = .scaleAspectFit
        myImageView.clipsToBounds = true
        
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
